'''sum=0
for i in range(1,2020):
    s=str(i)
    if('2' in s or '0' in s or '1' in s or '9' in s):
        sum=sum+i*i
print(sum)'''


'''js=0;
os=0;
print('请输入一个列表：')
while True:
    num=int(input('请输入一个整数：'))
    if num==-1:
        break
    if num<0:
       continue
    if num%2==0:
        os+=num
    else:
        js+=num
    print("奇数之和为",js)
    print("偶数之和为",os)'''
'''numbers = []
total = 0

while len(numbers) < 10:
    num = int(input("请输入一个奇数："))
    if num % 2 != 0:
        numbers.append(num)
        total += num
    else:
        print("请输入奇数！")
        
average = total / len(numbers)

print("列表中的奇数为：", numbers)
print("它们的和为：", total)
print("它们的平均值为：", average)'''

'''list=[]
total=0;
while len(list)<10:
    num = int(input("请输入一个奇数"))
    if num%2!=0:
        list.append(num)
        total+=num
    else:
        print('输入有误，请输入正确奇数：')
average = total / len(list)
print('这个列表的和为',total)
print('这个列表的平均值为',average)'''

'''输入5个整数放到列表list1中，输出下标及值，然后将列表list1中大于平均值的元素组成一个新列表list2，输出平均值和列表list2。请利用列表推导式解决该问题。'''


'''list1=[]
while len(list1)<5:
    num=int(input("请输入一个整数"))
    list1.append(num)
    total=sum(list1)
    for i in range(len(list1)):5
    
        print(i,list1[i])
average=sum(list1)/len(list1)
list2=(x for x in list1 if x>average)
print(list2)
print(average)'''




'''list1=[]
print('请输入五个数：')
for i in range(5):
    num=int(input(''))
    list1.append(num)

print('列表的下标及值为：')
for index,value in enumerate(list1):
    print(index,value)
total=sum(list1)
average=total/len(list1)
print('平均值为：',average)
list2=(x for x in list1 if x > average)
list2=list(list2)
print('列表list2为：',list2)'''


'''numbers = [int(str(i) + str(j) + str(k)) for i in range(1, 5) for j in range(1, 5) for k in range(1, 5) if i != j and j != k and i != k]
print(numbers)'''


'''list =[int(str(i) + str(j) + str(k)) for i in range(1,5) for j in range(1,5) for k in range(1,5) if i !=j and j!=k and i!=k]
print(list)'''

'''list=[1,9,8,7,6,5,13,3,2,1]
print('初始列表：',list)
list1=[x for x in list if x%2==0]
print("最终列表：",list1)'''


'''百钱买百鸡：一只公鸡5块钱，一只母鸡3块钱，三只小鸡1块钱，现在要用一百块钱买一百只鸡，问公鸡、母鸡、小鸡各多少只？请利用列表推导式解决该问题。'''


'''bjwt=[(x,y,z) for x in range(1,21) for y in range(1,34) for z in range(1,301) if x+y+z==100 and 5*x+3*y+z/3==100]
for X in bjwt:
    print("公鸡{}，母鸡{}，小鸡{}".format(X[0],X[1],X[2]))'''

#判断是否为一个质数
n = int(input())

if n == 2:
    print('yes')
else:
    flag = True
    for i in range(2, n):
        if n % i == 0:
            flag = False
            break
    if flag == True:
        print('yes')
    else:
        print('no')





